
$(function(){
	//改变勾选值
		var c= 0;		var cc = 0;
	$('.hot').click(function(){
		if($(this).attr('checked') == true){	
			$(this).val(1);			
		}else if($(this).attr('checked') == false){
			$(this).val(0);
		}
		
	})
	
	var hotBid=[];	var hotValue=[]; 	var srotBid=[];	var srotValue=[];
	$('.btnPost').click(function() {
		//编列hot值 和对应bid
		$('.hot').each(function(i){
			hotBid[i] = $(this).attr('bid');
			hotValue[i] = $(this).val();
		})
		$('.srot').each(function(i){
			srotBid[i] = $(this).attr('bid');
			srotValue[i] = $(this).val();
		})
		$.ajax({
		   type: "POST",
		   url:  APP+'/editSortAndHot',
		   data: "hotBid="+hotBid+"&hotValue="+hotValue+"&srotBid="+srotBid+"&srotValue="+srotValue,
		   success: function(msg){
		     location=location;
		   }

		})
	});
})